﻿<h5 class="ui header">Add Resource</h5>
<div class="ui divider"></div>


<form name="resourceform" role="form" class="ui secondary small form segment">
    <h5 class="ui header">Add Resource</h5>
    <div class="ui divider"></div>
    <div class="field">
        <label for="name">
            Name<span style="color: Red">*</span>
        </label>
        <input type="text" id="name" placeholder="Name" required data-ng-model="resource.Name" />
    </div><div class="ui divider"></div>
    <div class="field">
        <label for="description">
            Description<span style="color: Red">*</span>
        </label>
        <textarea id="description" placeholder="Description" required data-ng-model="resource.Description"></textarea>
    </div><div class="ui divider"></div>
    <div class="field" style="margin-bottom:10px;">
        <label for="location">
            Location<span style="color: Red">*</span>
        </label>

        <select ui-select2 data-ng-model="resource.LocationId" ng-required="true" data-placeholder="Location" style="width:100%;">
            <option value="">--Select--</option>
            <option ng-repeat="l in locations" value="{{l.Id}}">{{l.Name}}</option>
        </select>

    </div><div class="ui divider"></div>
    <div class="field">
        <label for="path">
            Path<span style="color: Red">*</span>
        </label>
        <input type="text" id="path" placeholder="Path" required data-ng-model="resource.Path" />
    </div><div class="ui divider"></div>
    <div class="field" style="margin-bottom: 10px;">
        <label for="priority">
            Priority<span style="color: Red">*</span>
        </label>
        <select ui-select2 style="width:100%;" ng-required="true" data-placeholder="Priority" id="priority" ng-model="resource.Priority">
            <option value="">--Select--</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </select>
    </div><div class="ui divider"></div>
    <div class="inline field">
        <button data-ng-disabled="resourceform.$invalid" data-ng-click="addResource(resource)"
                class="ui blue mini button">
            Submit
        </button>
        <a class="ui black mini button" href="/Resources">Cancel</a>
    </div>
</form>
